﻿#pragma once 

typedef enum {
	HUMANSEG_TYPE_PPHUMANSEG_398x224_ORT,
    HUMANSEG_TYPE_PPHUMANSEG_192x192_ORT,
    HUMANSEG_TYPE_RVM_400x224_ORT,    
    HUMANSEG_TYPE_RVM_512x288_ORT,        
    HUMANSEG_TYPE_RVM_640x360_ORT,
	HUMANSEG_TYPE_MBV3_256x144_ORT,
	HUMANSEG_TYPE_MAX
}HUMANSEG_TYPE;



typedef void * humanseg_ref_t;


#ifdef __cplusplus
extern "C"{
#endif 

void humanseg_print_all_models();

humanseg_ref_t humanseg_create(int type, int is_video, int enable_debug);

int humanseg_detect_i420(humanseg_ref_t h_seg, int width, int height, unsigned char **src_plane, int *src_pitch, unsigned char *alpha, int alpha_pitch);
int humanseg_detect_rgb24(humanseg_ref_t h_seg, int width, int height, unsigned char *buf_rgb, int src_pitch, unsigned char *alpha, int alpha_pitch);

int humanseg_bg_replace_i420(humanseg_ref_t h_seg, int width, int height, unsigned char **fg_plane, int *fg_pitch, 
            unsigned char **bg_plane, int *bg_pitch, unsigned char **mix_plane, int *mix_pitch,
            unsigned char *alpha, int alpha_pitch);

int humanseg_bg_replace_rgb24(humanseg_ref_t h_seg, int width, int height, unsigned char *fg_buf, int fg_pitch, 
            unsigned char *bg_buf, int bg_pitch, unsigned char *mix_buf, int mix_pitch,
            unsigned char *alpha, int alpha_pitch);

int humanseg_destroy(humanseg_ref_t h_seg);

#ifdef __cplusplus
}
#endif 